[body]
<!--script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=true&amp;key=ABQIAAAA8dADCAdhOl29nR-e3CW-OhRESbwMWwveIi60F3uz5tEBc7zpnRRsA813uR83H77Zjw-FazLniCAmIQ" type="text/javascript"></script-->
 <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=true&amp;key=ABQIAAAAZ7Ujpu9u6yfaaMh0ykYaYRRXFht1wfCidio4rGONufplb8w5SRT9x5MXPse6FDSKxpYkva86XCQO6g" type="text/javascript"></script>
<script src="/js/getpoint.js" type="text/javascript"></script>
{path: tpl=_sys/path.htm}
<div class="cms_form">
	<form>
		<div class="error">{error: type=user}</div>

		<div class="label">{msg:frm_sh_type}</div>
		<div class="field">
			<select name="sh_type" id="sh_type" onchange="set_sh_city();">
				<options source="sql:shops#sh_id id, sh_city name?sh_type=0$order=sh_id auto_query=no">
			</select>
			<input type="hidden" name="sh_city" id="sh_city">
			<script type="text/javascript">
				function set_sh_city(){
					var from_sh_type=document.getElementById('sh_type'), to_sh_city=document.getElementById('sh_city');
					to_sh_city.value=from_sh_type.options[from_sh_type.selectedIndex].innerHTML;
				}
				set_sh_city();
			</script>
		</div>
		<br class="sep">

		<div class="label">{msg:frm_shc_name}</div>
        <div class="field"><input type="text" name="shc_name" id="shc_name"></div>
        <br class="sep">

        <div class="label">{msg:frm_shc_name_where}</div>
        <div class="field"><input type="text" name="shc_name_where" id="shc_name_where" onblur="if(!moved)showAddress(this.value);"></div>
        <br class="sep">

        <div class="label">{msg:frm_shc_contacts}</div>
        <div class="field"><input type="text" name="shc_contacts" id="shc_contacts"></div>
        <br class="sep">

        <div class="label">{msg:frm_shc_dscr}</div>
        <div class="field"><input type="text" name="shc_dscr" id="shc_dscr"></div>
        <br class="sep">
        
        <div class="label">{msg:frm_sh_x}</div>
        <div class="field"><input type="text" name="sh_x" id="sh_x"></div>
        <br class="sep">

        <div class="label">{msg:frm_sh_y}</div>
        <div class="field"><input type="text" name="sh_y" id="sh_y"></div>
        <br class="sep">
        
        <div class="label">&nbsp;</div>
        <div class="field">
					<input  type="submit" class="submit" value="{msg:save}">
					<input  type="button" class="delete" value="{msg:delete}" onClick="if(confirm('{msg:confirm}')) document.location='{link}/delete'; return false;">
        </div>
        <br class="sep">
        <div id="p228_map" style="overflow:hidden;width: 90%; height: 550px; position: relative; margin: 0 auto;"></div>
        <script type="text/javascript">
            p228_initialize();
        </script>

	</form>
	<br class="sep">
</div>
[success]
<div>
	<label>{msg:frm_res_saved}</label>
	<script type="text/javascript">document.location.assign( '{link: link=admin/shops/{sh_id}}' );
</script>
</div>

[onDelete]
<div>
	<label>{msg:frm_res_deleted}</label>
	<script type="text/javascript">document.location.assign( '{link: link=admin/shops/}' );
	</script>
</div>
